#include "FlashScreen.h"
#include "MAHeaders.h"
#include "../std.h"

FlashScreen::FlashScreen(MAHandle image){
	Image* splash = new Image(0, 0, 139, 54, NULL, false, false, image);
	this->setMain(splash);
	Environment::getEnvironment().addTimer(this, SPLASHFRAMES, 1);
}

FlashScreen::~FlashScreen(){

}

void FlashScreen::runTimerEvent(){
	showNextScreen();
}

void FlashScreen::showNextScreen(){
	Environment::getEnvironment().removeTimer(this);
	if (APPCONTROLLER->getNew() == 0){
		APPCONTROLLER->show("MainScreen");
	}else{
		APPCONTROLLER->show("GOIIndex");
	}
}

